_t_a_r_g_e_t The histogram whose parameters are to be set. Must be
one of GGGGLLLL____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM or GGGGLLLL____PPPPRRRROOOOXXXXYYYY____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM.
_w_i_d_t_h The number of entries in the histogram table. Must be a
power of 2.
_i_n_t_e_r_n_a_l_f_o_r_m_a_t The format of entries in the histogram table. Must be
one of GGGGLLLL____AAAALLLLPPPPHHHHAAAA, GGGGLLLL____AAAALLLLPPPPHHHHAAAA4444, GGGGLLLL____AAAALLLLPPPPHHHHAAAA8888, GGGGLLLL____AAAALLLLPPPPHHHHAAAA11112222,
GGGGLLLL____RRRRGGGGBBBB5555____AAAA1111, GGGGLLLL____RRRRGGGGBBBBAAAA8888, GGGGLLLL____RRRRGGGGBBBB11110000____AAAA2222, GGGGLLLL____RRRRGGGGBBBBAAAA11112222, or
GGGGLLLL____RRRRGGGGBBBBAAAA11116666.
_s_i_n_k If GGGGLLLL____TTTTRRRRUUUUEEEE, pixels will be consumed by the histogramming
process and no drawing or texture loading will take
place. If GGGGLLLL____FFFFAAAALLLLSSSSEEEE, pixels will proceed to the minmax
process after histogramming.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
When GGGGLLLL____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM is enabled, RGBA color components are converted to
histogram table indices by clamping to the range [0,1], multiplying by
the width of the histogram table, and rounding to the nearest integer.
The table entries selected by the RGBA indices are then incremented. (If
the internal format of the histogram table includes luminance, then the
index derived from the R color component determines the luminance table
entry to be incremented.) If a histogram table entry is incremented
beyond its maximum value, then its value becomes undefined. (This is not
an error.)
Histogramming is performed only for RGBA pixels (though these may be
specified originally as color indices and converted to RGBA by index
table lookup). Histogramming is enabled with ggggllllEEEEnnnnaaaabbbblllleeee and disabled with
When _t_a_r_g_e_t is GGGGLLLL____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM, ggggllllHHHHiiiissssttttooooggggrrrraaaammmm redefines the current histogram
table to have _w_i_d_t_h entries of the format specified by _i_n_t_e_r_n_a_l_f_o_r_m_a_t.
The entries are indexed 0 through width - 1, and all entries are
initialized to zero. The values in the previous histogram table, if any,
are lost. If _s_i_n_k is GGGGLLLL____TTTTRRRRUUUUEEEE, then pixels are discarded after
histogramming; no further processing of the pixels takes place, and no
drawing, texture loading, or pixel readback will result.
When _t_a_r_g_e_t is GGGGLLLL____PPPPRRRROOOOXXXXYYYY____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM, ggggllllHHHHiiiissssttttooooggggrrrraaaammmm computes all state
information as if the histogram table were to be redefined, but does not
actually define the new table. If the requested histogram table is too
large to be supported, then the state information will be set to zero.
This provides a way to determine if a histogram table with the given
parameters can be supported.
NNNNOOOOTTTTEEEESSSS
ggggllllHHHHiiiissssttttooooggggrrrraaaammmm is present only if GGGGLLLL____AAAARRRRBBBB____iiiimmmmaaaaggggiiiinnnngggg is returned when
ggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg is called with an argument of GGGGLLLL____EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS.
EEEERRRRRRRROOOORRRRSSSS
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_a_r_g_e_t is not one of the allowable
values.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _w_i_d_t_h is less than zero or is not a
power of 2.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _i_n_t_e_r_n_a_l_f_o_r_m_a_t is not one of the
allowable values.
GGGGLLLL____TTTTAAAABBBBLLLLEEEE____TTTTOOOOOOOO____LLLLAAAARRRRGGGGEEEE is generated if _t_a_r_g_e_t is GGGGLLLL____HHHHIIIISSSSTTTTOOOOGGGGRRRRAAAAMMMM and the
histogram table specified is too large for the implementation.
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllHHHHiiiissssttttooooggggrrrraaaammmm is executed between the
execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.